package com.ruoyi.flow.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.flow.domain.Test;
import com.ruoyi.flow.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/test")
public class TestController extends BaseController {

    @Autowired
    TestService testService;

    @GetMapping("/test")
    public TableDataInfo test() {
        startPage();
        List<Test> list = testService.list();
        return getDataTable(list);
    }

}
